<?php
if(isset($posts)) {
	foreach ($posts as $post):?>
		<div class="article">
			<h2>
				<a class="linkTitle" href="/posts/detail/<?php echo $post['Post']['id']; ?>"><span><?php echo $post['Post']['title']; ?></span></a>
			</h2>
			<div class="clr"></div>
			<p class="infopost">
				<span class="date"><?php echo $post['Post']['created']; ?></span>
				Posted by <a href="/adminposts/profile/<?php echo $post['Post']['user_id']; ?>"><?php echo $post['Post']['username']; ?></a>
				&nbsp;|&nbsp;
				<!-- Filed under <a href="#">templates</a>, <a href="#">internet</a> -->
				with <a
					href="/posts/detail/<?php echo $post['Post']['id']; ?>#commentListID"
					class="com"><?php echo $post['Post']['numComment']?> Comments</a>
			</p>
			<img src="<?php echo $post['Post']['thumbnail']; ?>" width="201"
				height="146" alt="" class="fl" />
	
			<div align="justify"><?php echo $post['Post']['body']; ?></div>
	
			<div class="clr"></div>
			<p class="spec" align="right">
				<a href="/posts/detail/<?php echo $post['Post']['id']; ?>"
					class="rm">Read more &raquo;</a>
			</p>
		</div>
<?php 
	endforeach;
}
?>